package algorithms;

public class EuclidAlgorithm {
	static int euclid(int a, int b) {
		if (a == 0) {
			return b;
		} else if (b == 0) {
			return a;
		}
		
		int rest = a % b;
		
		return euclid(b, rest);
	}
	
	public static void main(String[] args) {
		System.out.println(euclid(35, 0	));
	}
}
